<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../代码/01-react基础/lib/react.development.js"></script>
    <script src="../代码/01-react基础/lib/react-dom.development.js"></script>
    <script src="../代码/01-react基础/lib/babel.min.js"></script>
</head>

<body>
    <div id="root"></div>
</body>
<script type="text/babel"">
    const root = ReactDOM.createRoot(document.getElementById('root'))

    function Header() {
        console.log('Header run');
        console.log('Header this: ', this);// 函数组件中this 指向undefined
        return (
            <div>我是Header组件</div>
        )
    }

    root.render((
        <>
            <Header></Header>
        </>
    ))
</script>

</html>